<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>QeePHP 快速入门</title>
<link href="css/base.css" rel="stylesheet" type="text/css">
</head>
<body>

<div id="page">


<div class="guide-section">

  <div class="guide-header">
    <span class="nav">
      <a href="http://qeephp.com/docs/">文档索引</a>
      &raquo;
      <a href="index.html">QeePHP 快速入门</a>
      &raquo;
      <a href="node-development.html">开始开发</a>
      &raquo;
      修改配置文件    </span>
  </div>

  <div class="guide-section-details formatted">

    
<h1>修改配置文件</h1>

<p>在接下来的开发工作中，我们要借助自动化工具来创建控制器和模型。但这样做的前提是正确修改配置文件，让自动化工具能够读取
todo 应用的数据库信息。</p>

<h2>修改 database.yaml</h2>

<p>configs/database.yaml
是保存数据库连接信息的配置文件，默认内容如下：</p>

<pre class="python code"><span
class="co1"># devel 模式</span>
devel:
  driver:     mysql
  host:       localhost
  login:      username
  password:   password
  database:   todo_devel_db
  charset:    utf8
  prefix:
&nbsp;
<span
class="co1"># test 模式</span>
<span
class="kw3">test</span>:
  driver:     mysql
  host:       localhost
  login:      username
  password:   password
  database:   todo_test_db
  charset:    utf8
  prefix:
&nbsp;
<span
class="co1"># deploy 模式</span>
deploy:
  driver:     mysql
  host:       localhost
  login:      username
  password:   password
  database:   todo_db
  charset:    utf8
  prefix:</pre>

<p>可以看到针对三种运行模式定义了三组连接信息。本教程会一直使用开发模式，所以我们只修改
devel 这一组：</p>

<pre class="python code"><span
class="co1"># devel 模式</span>
devel:
  driver:     mysql
  host:       localhost
  login:      todo
  password:   todo_db_pass
  database:   todo_db
  charset:    utf8
  prefix:</pre>

<p>如果你的数据库设置和上面的信息不同，请对照进行修改配置文件。</p>

<p>$Id: development-configs.texy 2295 2009-03-10 07:48:18Z dualface $</p>

  </div>

  <div class="guide-footer">

    <table border="0" width="100%">
      <tr>
        <td align="left" width="200">
                    &laquo;
          <a href="node-development-yaml.html">YAML 入门</a>
          
        </td>

        <td align="center">
          本章：<a href="node-development.html">开始开发</a>
          <br />
          <a href="index.html">返回索引页</a>
        </td>

        <td align="right" width="200">
                    <a href="node-automation.html">使用自动化工具</a> 
          &raquo;
                  </td>
      </tr>
    </table>

  </div>

</div>


</div>

</body>
</html>


